Skip to content

feat(frontend): label the 'sbom' scan kind (badge + admin filter, EN/KO)#408

Merged
haksungjang merged 1 commit into
mainfrom
feat/sbom-ingest-fe-badge
Jun 14, 2026
Merged

feat(frontend): label the 'sbom' scan kind (badge + admin filter, EN/KO)#408
haksungjang merged 1 commit into
mainfrom
feat/sbom-ingest-fe-badge

Conversation

@haksungjang

Copy link
Copy Markdown
Contributor

What

The external SBOM ingest endpoint (#406) creates scans with kind="sbom". This surfaces that kind in the UI so an ingested scan renders a proper label instead of a raw i18n key.

Changes

  • Promote ScanKind to the runtime mirror SCAN_KIND_VALUES (source, container, sbom), matching the backend's SCAN_KIND_VALUES tuple; derive the admin scan-kind filter KIND_OPTIONS from it so they can't drift.
  • EN/KO labels (SBOM upload / SBOM 업로드) for the three dynamic kind→label maps: scans page badge, project-overview recent-scans badge, and the admin scans kind filter.
  • Catalog-mirror contract test walking SCAN_KIND_VALUES against all three label maps in both locales (CLAUDE.md §2 rule 2) so a future kind can't ship a raw i18n key.

Badges carry no per-kind color, so sbom renders with the same outline style as source/container — label only. The scan-trigger dialog (SourceSelectDialog) is intentionally untouched: SBOM is external ingest, never a trigger target.

Verification

  • typecheck, lint (0 errors), i18n:check (EN/KO parity, 0 drift), vitest (1256 passed, 1 skipped) — all green.

The external SBOM ingest endpoint (#406) creates scans with kind="sbom".
Surface it in the UI so ingested scans render a proper label instead of a
raw key:

- Promote ScanKind to the runtime mirror SCAN_KIND_VALUES (source, container,
  sbom), matching the backend's SCAN_KIND_VALUES tuple; derive the admin
  scan-kind filter KIND_OPTIONS from it so the two can't drift.
- Add EN/KO labels ("SBOM upload" / "SBOM 업로드") for the three dynamic
  kind→label maps: scans page badge, project-overview recent-scans badge,
  and the admin scans kind filter.
- Add a catalog-mirror contract test walking SCAN_KIND_VALUES against all
  three label maps in both locales (CLAUDE.md §2 rule 2) so a future kind
  can't ship a raw i18n key.

Badges carry no per-kind color, so sbom renders with the same outline style
as source/container — label only. i18n:check parity clean.
@haksungjang haksungjang merged commit f78442a into main Jun 14, 2026
19 checks passed
@haksungjang haksungjang deleted the feat/sbom-ingest-fe-badge branch June 14, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant